<%-- 
    Document   : popuptemplate
    Created on : Jun 4, 2012, 2:47:19 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/> 
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/> 
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>


        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){
              
                var b = location.pathname;
                $j("input[id$='message']").val(b);
                validateform("job");
                $j('input#leavedate1,input#leavedate2').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                $j(".abc").live("change",function(){
                    var obj1 = $j(this).children("option:selected").val();
                     if(obj1 != null)
                        {
                            $j.post("actionDebt.jsp?action=cn&id="+obj1);
                        }
                });
            });
        </script>
        <style type="text/css">
            .ui-datepicker-trigger{
                margin-top: 2px !important;
            }
            #ui-datepicker-div
            {
                z-index: 9999999;
            }
            .number{
                text-align: right;
            }
            .stardates{
                float:left;
                width:281px;
                margin-left:11px;
            }
            .stardates label{
                float:left;
                width:92px;
                text-align: right;
                margin-top:4px;
            }
            .stardates input[type="text"] {
                width:100px ;
                float:left;
                margin-left: 4px;
                margin-right: 4px;
            }
            .enddates input[type="text"] {
                width:100px;
                float:left;
                margin-left:0px;
                margin-right: 4px;
            }
            .enddates label{
                float:left;
                width:110px;
                text-align: right;
                margin-top:4px;
                margin-right: 4px;
            }
            .enddates{
                float:left;
            }
            .bg_job_left_right{
                background: #fff;
            }
            .field_blue{
                background: #fff !important;
            }
            .fields_input label{
                width: 105px !important;
            }
            .addjob_left_right{
                width:690px !important;
            }
        </style>

    </head>


    <body style=" float:left; width:auto; height:auto; margin:0px;">
        <f:view>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <a4j:form id="job" >
                <div class="popup" style="height:450px; width:660px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="TÀI CHÍNH KẾ TOÁN"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content labe_short" style="display: block;margin-top: 3px;">
                                <div class="job_left_right addjob_left_right bg_job_left_right">
                                    <!-- start job_left-->
                                    <div class="job_left" style="width:340px">
                                        <div class="fields_input">
                                            <label><h:outputText value="Loại phiếu"/>* :</label>
                                            <h:selectOneMenu  value="#{T950Bean.ft000}"  >  
                                                <f:selectItems value="#{T950Bean.listCombT100}" />  

                                            </h:selectOneMenu> 
                                            
                                            <h:selectOneMenu value="#{T950Bean.tv952}"  style="width:70px;margin-left:5px;">  
                                                <f:selectItem itemValue="1" itemLabel="VND" />  
                                                <f:selectItem itemValue="2" itemLabel="USD" />   
                                                <f:selectItem itemValue="3" itemLabel="EUR" />   
                                            </h:selectOneMenu>
                                        </div>

                                        <div class="fields_input">
                                            <label><h:outputText value="Mục đích"/> :</label>
                                            <h:selectOneMenu value="#{T950Bean.pt075}"  >  
                                                <f:selectItems value="#{T950Bean.listCombT075}" />  

                                            </h:selectOneMenu> 

                                        </div>

                                    </div>

                                    <div class="job_right">


                                    </div>

                                </div>
                                <div class="job_left_right addjob_left_right" style="width:690px;background-color: #C9D7E5;">
                                    <!-- start job_left-->
                                    <div class="job_left" style="width:340px">
                                        <div class="fields_input" >
                                            <label><h:outputText value="Tài khoản"/>* :</label>
                                            <h:selectOneMenu value="#{T950Bean.fh075}">  
                                                <f:selectItems value="#{T950Bean.listCombH075}" />  

                                            </h:selectOneMenu>

                                        </div>                                  

                                    </div>
                                    <!-- end job left-->
                                    <!-- start job right-->
                                    <div class="job_right">

                                        <div class="fields_input" >
                                            <label><h:outputText value="Người đề xuất"/> :</label>
                                            <h:selectOneMenu value="#{T950Bean.pn100t}">  
                                                <f:selectItems value="#{T950Bean.listCombN100}" />  

                                            </h:selectOneMenu>

                                        </div>

                                    </div>
                                    <!-- end job right-->
                                </div>

                                <!-- start job -left -right-->
                                <div class="job_left_right addjob_left_right" style="width:690px;">
                                    <!-- start job_left-->
                                    <div class="job_left" style="width:340px">
                                        <div class="fields_input">                                            
                                            <label><h:outputText value="Code tour"/>:</label> <!--="showPleaseWait();" -->
                                            <h:selectOneMenu id="codeTour" value="#{T950Bean.pv050}" styleClass="fv050">
                                                <f:selectItems value="#{T950Bean.listCombB050}"  />   
                                                <a4j:support event="onchange"   reRender="tour" actionListener="#{TourBean.actionListenner}"/>
                                            </h:selectOneMenu>
                                        </div>
                                        <div class="fields_input">
                                            <label class="longlabel">Giá trị:</label>

                                            <h:inputText value="#{T950Bean.tn951St}" styleClass="numberright" />
                                        </div>
                                        <div class="fields_input">
                                            <label>Số hóa đơn:</label>
                                            <h:inputText value="#{T950Bean.tv969}" styleClass="" />
                                        </div>
                                        <div class="fields_input">
                                            <label>Số seri:</label>
                                            <h:inputText value="#{T950Bean.tv970}" styleClass="" />
                                        </div>

                                    </div>
                                    <!-- end job left-->
                                    <!-- start job right-->
                                    <div class="job_right">

                                        <div class="fields_input ">
                                            <label>Ngày nhập HD:</label>

                                            <input value="<h:outputText value="#{T950Bean.td953}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>" type="text" id="leavedate1" name="leavedate1" class="required Date" />


                                        </div>
                                        <div class="fields_input">
                                            <label>Ngày hiệu lực:</label>


                                            <input value="<h:outputText value="#{T950Bean.td954}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>" type="text" id="leavedate2" name="leavedate2" class="required Date" />
                                        </div>
                                        <div class="fields_input job_feild_input">
                                            <label> Nội bộ:</label>
                                            <h:inputText value="#{T950Bean.tv957}" styleClass="" />
                                        </div>
                                        <div class="fields_input ">
                                            <label class="longlabel">Bên ngoài:</label>
                                            <h:inputText value="#{T950Bean.tv958}" styleClass="" />
                                        </div>
                                    </div>
                                    <!-- end job right-->
                                </div>
                                <!-- end job left -right-->
                                <div class="group_feild bg_job_left_right addjob_left_right">

                                    <div class="field_blue">
                                        <div class="fields_input  ">
                                            <label>Ghi chú:</label>
                                            <h:inputTextarea value="#{T950Bean.tv971}" style="width:506px;" />
                                        </div>
                                    </div>
                                </div>
                                <div class="alert" style="margin-top:0px;">

                                </div>
                            </div>

                        </div>

                    </div>
                    <div class="popup-footer">

                        <div class="buttonsave" onclick="jQuery.fancybox.close() "  ><span><h:outputText value="#{locale.close}"/></span></div>
                        <h:commandButton onclick="return validatecheck('job');" action="#{T950Bean.updateTn950}"  value="#{locale.save}" styleClass="buttonsave">

                        </h:commandButton>
                        <h:inputHidden value="#{T950Bean.pt950}" id="pt950"/>
                        <h:inputHidden value="#{T950Bean.papeload}" id="page"/>
                        <h:inputHidden value="#{T950Bean.different}" id="different"/>
                        


                    </div>
                </div>
            </a4j:form>
        </f:view>
    </body>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',360 );
    });
</script>